#ifndef _AS_TARGET_ENTITY_H_
#define _AS_TARGET_ENTITY_H_

#include "ASEntity.h"

NS_AS_BEGIN

class ASTargetEntity:public ASEntity
{
public:
	ASTargetEntity(int nAttrsNumI = 0,int nAttrsNumF = 0);
	virtual ~ASTargetEntity();
	virtual void destory() override;
	void setTarget(ASTargetEntity* pNewTarget);
	ASTargetEntity* getTarget();
	const std::vector<ASTargetEntity*>& getListeners();
	unsigned int getListenersNum();
	void clearTargetAndListeners();
	virtual void notifyTargetChange(){};//override to catch target change msg
protected:
	ASTargetEntity* _pTarget;
	std::vector<ASTargetEntity*> _vListeners;
};

NS_AS_END

#endif